#pragma once 

#include "Log.hpp"
#include "Inet_Addr.hpp"
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <string>
#include <errno.h>
#include <strings.h> //bzero
#include <netinet/in.h> //struct sockaddr_in
#include <arpa/inet.h>
#include <functional>
#include <unistd.h>//read write

#include <memory>
#include <iostream>

#include <thread>



//不能用c++的枚举类, 因为exit()只能传整型, 枚举类为对象
enum EXIT_CODE
{
    NORMAL = 0,
    USAGE_ERR,
    LISTEN_SOCKFD_CON_ERR,
    SOCKFD_CON_ERR,
    BIND_ERR,
    LISTEN_ERR,
    CONNECT_ERR,
    COMMUNICATION_ERR,
    FORK_ERR,
    READ_ERR,
    SEND_ERR,
    OPEN_ERR
};


class no_copy
{
public:
    no_copy() = default;
    ~no_copy() = default;

    no_copy(const no_copy& self) = delete;
    no_copy& operator=(const no_copy& self) = delete;

};